from fastapi import FastAPI
from pathlib import Path
from app.utils.router_loader import auto_register_routes

app = FastAPI(
    title="prompt manager Service",
    description="这是一个基于 FastAPI 的提示词管理服务",
    version="1.0.0",
    docs_url="/docs",  # Swagger UI 地址
    redoc_url="/redoc"  # ReDoc 文档地址
)

# 自动注册所有API路由
auto_register_routes(app, str(Path(__file__).parent / "api"))

@app.get("/")
def read_root():
    return {"message": "Welcome to Prompt Management API"}